<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>stapes例子09</title>
    <script type="text/javascript" src="../lib/stapes-0.8.1/stapes.js"></script>
    <script type="text/javascript" src="../lib/jquery-easyui-1.4.2/jquery.min.js"></script>
</head>
<body>
    <h1>你好!!!</h1>

    <div id="app">11111</div>


    <script type="text/javascript">
        Stapes.extend({
            // Sets an DOM element for views
            "setElement" : function(el) {
                this.el = el;
                this.$el = $(el); // jQuery or Zepto reference
            }
        });

        var Module = Stapes.subclass();
        var module = new Module();

        module.setElement( document.getElementById("app") );

        console.log( module.el ); // "#app" DOM element
        console.log( module.$el ); // jQuery or Zepto element
    </script>


</body>
</html>